﻿using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SQLiteCoreDB.Common
{
    /// <summary>
    /// 配置各种，key
    /// </summary>
    public class KeyValueConfig
    {
        private static Dictionary<string, string> _configuration;

        public KeyValueConfig(Dictionary<string, string> builder)
        {
            _configuration = builder;
        }

        /// <summary>
        /// 文件存储目录，上传文件保存目录
        /// </summary>
        public static string FileSaveDir
        {
            get
            {
                return _configuration["file_dir"];
            }
        }
        public static string DBConnStr
        {
            get
            {
                return _configuration["SQLite"];
            }
        }
        public static int VN
        {
            get
            {
                return int.Parse(_configuration["VN"]);
            }
        }

        /// <summary>
        /// 用户登录session  key
        /// </summary>
        public const string KeyUserSession = "whl_login_auth";
        public const string Cookie_Token = "jwtToken";

        public const string TokeKey = "qwertyuiopasdfghjklzxcvbnm1234567890";
        public const string issuer = "demo";
        public const string audience = "text";
    }
}